JSGF.SpriteRect = JSGF.inherit(JSGF.SpriteBase);

JSGF.SpriteRect.prototype.additional = function(width, height) {
	this.type = "JSGF.SpriteRect";
	this.width = width;
	this.height = height;
	this.color = "#000000";
	this.fill = false;
}

JSGF.SpriteRect.prototype.draw = function(context) {
	context.save();
	if (this.alpha != 1.0) {
		context.globalAlpha = this.alpha;
	}
	context.beginPath();
	if (this.fill == true) {
		context.fillStyle = this.color;
		context.fillRect(this.x, this.y, this.width, this.height);
	} else {
		context.strokeStyle  = this.color;
		context.strokeRect(this.x, this.y, this.width, this.height);
	}
	context.closePath();
	context.restore();
}

////////////////////////////////////////
//Public
////////////////////////////////////////

JSGF.SpriteRect.prototype.setColor = function(color) {
	this.color = color;
}

JSGF.SpriteRect.prototype.getColor = function() {
	return this.color;
}

JSGF.SpriteRect.prototype.setFill = function(fill) {
	this.fill = fill;
}

JSGF.SpriteRect.prototype.getFill = function() {
	return this.fill;
}

////////////////////////////////////////
// definition by user
////////////////////////////////////////

